<template>
	<page-wraper :safeAreaInsetBottom="false">
	</page-wraper>
</template>

<script lang="ts" setup>
	import { onLoad, onUnload } from '@dcloudio/uni-app';
	import { useToast } from '@/uni_modules/wot-design-uni';

	const toast = useToast();

	onLoad(() => {
		toast.error({
			msg: '支付失败',
			closed: () => {
				uni.redirectTo({ url: '/pages/order/Index' });
			}
		});
	})

	onUnload(() => {
		const backUrl = uni.getStorageSync('backUrl');

		if (backUrl) {
			uni.setStorageSync('backUrl', '/pages/order/Index');
		}
	})
</script>

<style lang="scss" scoped>
	:deep(.page-wraper) {
		background: #f6f6f6;
	}
</style>